$(function () {

    //操作时间
    $('#time_start').daterangepicker({
        "singleDatePicker": true,
        "timePicker": true,
        "timePicker24Hour": true,
        "timePickerSeconds": true,
        "parentEl": "200",
        locale: {
            format: 'YYYY-MM-DD HH:mm:ss',
            applyLabel: '确认',
            cancelLabel: '取消',
            weekLabel: 'W',
            customRangeLabel: 'Custom Range',
            daysOfWeek: ["日", "一", "二", "三", "四", "五", "六"],
            monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
        }
    }, function (start, end, label) {
        $('#time_start').val(start.format('YYYY-MM-DD HH:mm:ss'));
    });
    $("#time_start").val("");//清空控件默认时间

    $('#time_end').daterangepicker({
        "singleDatePicker": true,
        "timePicker": true,
        "timePicker24Hour": true,
        "timePickerSeconds": true,
        "parentEl": "200",
        locale: {
            format: 'YYYY-MM-DD HH:mm:ss',
            applyLabel: '确认',
            cancelLabel: '取消',
            weekLabel: 'W',
            customRangeLabel: 'Custom Range',
            daysOfWeek: ["日", "一", "二", "三", "四", "五", "六"],
            monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
        }
    }, function (start, end, label) {
        $('#time_end').val(start.format('YYYY-MM-DD HH:mm:ss'));
    });
    $('#time_end').val("");//清空控件默认时间

    //日期时间查询条件不为空的情况下，给控件赋值
    if ($("#timeS_hidden").val() != null || $("#timeS_hidden").val() != "") {
        $("#time_start").val($("#timeS_hidden").val());
    }
    if ($("#cTimeE_hidden").val() != null || $("#timeE_hidden").val() != "") {
        $("#time_end").val($("#timeE_hidden").val());
    }
})